﻿using System;
using System.Collections.Specialized;
using System.IO;
using System.Text;

namespace AspNetCoreMini
{
    public class HttpRequest: IHttpRequest
    {
        private readonly IHttpRequest _feature;

        public Uri Url => _feature.Url;
        public NameValueCollection Headers => _feature.Headers;
        public Stream Body => _feature.Body;
        public string Method => _feature.Method;
        public Encoding ContentEncoding => _feature.ContentEncoding;

        public HttpRequest(IFeatureCollection features) => _feature = features.Get<IHttpRequest>();
    }
}